local ty_1v2_hf = fk.CreateSkill {
    name = "ty_1v2_hf&",
}

Fk:loadTranslationTable {
    ["ty_1v2_hf&"] = "合肥",
    [":ty_1v2_hf&"] = "摸牌阶段开始时，你可以获得一名其他角色的一张手牌；你于回合使用【杀】的次数+1。",

}

ty_1v2_hf:addEffect(fk.EventPhaseStart, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(ty_1v2_hf.name) and player.phase == Player.Draw
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        local targets = table.filter(room:getOtherPlayers(player, false), function(p)
            return not p:isKongcheng()
        end)
        if #targets == 0 then return end
        local to = room:askToChoosePlayers(
            player,
            {
                targets = targets,
                min_num = 1,
                max_num = 1,
                prompt = "合肥：请选择一名其他角色，获得其一张手牌",
                skill_name = ty_1v2_hf.name,
            }
        )
        if #to > 0 then
            event:setCostData(self, to[1])
            return true
        end
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local to = event:getCostData(self)
        local id = room:askToChooseCard(player, { target = to, flag = "h", skill_name = ty_1v2_hf.name })
        room:obtainCard(player, id, false, fk.ReasonPrey, player)
    end,
})

ty_1v2_hf:addEffect("targetmod", {
    residue_func = function(self, player, skill, scope, card, to)
        if player:hasSkill(ty_1v2_hf.name) and card and card.trueName == "slash" and scope == Player.HistoryPhase then
            return 1
        end
    end,
})
return ty_1v2_hf
